package com.yeyks.common.em.cnbooking;

/**
 * @author fuchangshuai
 * @date 2019/09/23 14:07
 */
public enum CnGroupIdEnum {
    INTERNET("4", "网络"),
    PARK("5", "停车场"),
    TRAFFIC("6", "交通服务"),
    ROOM_DEVICE("7", "房间设施"),
    HOTEL_SERVICE("8", "酒店服务"),
    HOTEL_DEVICE("9", "酒店设施"),
    DINING_SERVICE("10", "餐饮服务"),
    MEETING_ROOM("11", "会议室"),
    RECREATION("12", "休闲娱乐");
    String value;
    String desc;

    CnGroupIdEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String value() {
        return this.value;
    }

    public String desc() {
        return this.desc;
    }

    public static String getDesc(String value) {
        for (CnGroupIdEnum cnResponseCodeEnum : values()) {
            if (cnResponseCodeEnum.value().equals(value)) {
                return cnResponseCodeEnum.desc();
            }
        }
        return null;
    }

    public static String getValue(String desc) {
        for (CnGroupIdEnum cnResponseCodeEnum : values()) {
            if (cnResponseCodeEnum.desc().equals(desc)) {
                return cnResponseCodeEnum.value();
            }
        }
        return null;
    }
}
